package com.mmall.controller;

import com.mmall.service.IOrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.OrderItem;

import java.util.List;

@RestController
@RequestMapping("/orderItem")
public class OrderItemMapperController {

    @Autowired
    private IOrderItemService orderItemService;

    @PostMapping("/batchInsert")
    public void batchInsert(@RequestBody List<OrderItem> orderItems) {
        orderItemService.batchInsert(orderItems);
    }
}
